<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="cn.cjyll.C3P0DataSoure.JDBCUtilsC3P0"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<jsp:include page="head.jsp" />
<body class="page-body">
<!--  <div class="page-container">-->
<jsp:include page="nav.jsp" />
    <!-- Xenon Counter Widget -->
    <% 
        Connection con = JDBCUtilsC3P0.getConnection();
        String sql = "SELECT nr FROM gg;";
        PreparedStatement ps = con.prepareStatement(sql);
        ResultSet res  = ps.executeQuery();
        while(res.next()){
            request.setAttribute("gg", res.getString("nr"));
        }
        ps.close();
        con.close();
    %>
    
    ${requestScope.autologin }
    
    
            <div class="row">
                
            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-red">
                    <div class="icon"><i class="entypo-users"></i></div>
                    <div class="num" data-start="0" data-end="" data-postfix="" data-duration="1500" data-delay="0">${sessionScope.maxll }MB</div>
                    
                    <h3>总计流量</h3>
                    
                </div>
        
            </div>      

            
            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-green">
                    <div class="icon"><i class="entypo-chart-bar"></i></div>
                    <div class="num" data-start="0" data-end="" data-postfix="" data-duration="1500" data-delay="600">${sessionScope.syll }MB</div>
        
                    <h3>剩余流量</h3>
                    
                </div>
        
                    </div>
                    
            <div class="col-sm-3 col-xs-6">
                                          
                <div class="tile-stats tile-aqua">
                    <div class="icon"><i class="entypo-mail"></i></div>
                    <div class="num" data-start="0" data-end="" data-postfix="" data-duration="1500" data-delay="600">${sessionScope.days }天</div>
                    
                    <h3>剩余使用时间</h3>
                    
                </div>
        
                    </div>

            <div class="col-sm-3 col-xs-6">
        
                <div class="tile-stats tile-blue">
                    <div class="icon"><i class="entypo-rss"></i></div>
                    <div class="num" data-start="0" data-end="" data-postfix="" data-duration="1500" data-delay="1800">
                    <h3>开通时间：${sessionScope.starttime }</h3></div>
                    <hr />
                    <h3>到期时间：${sessionScope.endtime }</h3>
                
                </div>
        
            </div>

                        
                    </div>

            
            <div class="row">
                <div class="col-sm-12">
                    <div class="panel panel-color panel-info"><!-- Add class "collapsed" to minimize the panel -->
                        <div class="panel-heading">
                            <h3 class="panel-title">流量充值</h3>
                            
                           
                        </div>
                        
                        <div class="panel-body">
                    
                      <p style="color:red;font-size:15px;line-height:1.5;"><img border="0" width="32" src="http://i.niupic.com/images/2016/09/03/kSs2RA.gif">&nbsp;&nbsp;公告：${requestScope.gg }</p>
                            <br>
                            <form action="" method="POST" id="kmcz" role="form" class="validate">
                                <div class="input-group">
                                    <input type="text" placeholder="请输入卡密" class="form-control no-right-border form-focus-info" id="km" name="km"  data-validate="required" data-message-required="请输入卡密信息">
                               
                                    <span class="input-group-btn">
                                   <button class="btn btn-info" type="submit">马上充值</button>
                                    </span>
                                </div>
                            </form>
            
                        </div>

                    </div>
                </div>
            </div>
            
            <div class="row">
                <div class="col-sm-12">
                        <div class="panel panel-color panel-danger"><!-- Add class "collapsed" to minimize the panel -->
                            <div class="panel-heading">
                                <h3 class="panel-title">在线充值</h3>
                                
                                <div class="panel-options">
                                    <a href="#" data-toggle="panel">
                                        <span class="collapse-icon">–</span>
                                        <span class="expand-icon">+</span>
                                    </a>
                                </div>
                            </div>
                            
                            <div class="panel-body">

                                    <div class="row">
                                        <div align="center" class="col-sm-6">
                                            <a href="http://alipay.com" class="btn btn-orange btn-icon">
                                                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;支付宝在线充值</span>
                                            </a>
                                        </div>
                                        
                                         <div align="center" class="col-sm-6">
                                            <a href="${pageContext.request.contextPath }/management/user/buy.jsp" class="btn btn-orange btn-icon">
                                                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品在线购买</span>
                                            </a>
                                        </div>
                                 
                                    </div>
                
                            </div>

                        </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <form action="" method="POST" id="qiandao_f" role="form">
                    <input type="hidden" name="qiandao" value="1"/>
                    <button type="button" class="btn btn-success btn-icon-standalone btn-block">
                        <i class="fa-magic"></i>
                      <span style="padding-left: 35px;">超级云流量平台</span>
                    </button>
                    </form>
                </div>
                <div class="col-sm-6">
                    <a class="btn btn-blue btn-sm btn-icon-standalone btn-block">
                        <i class="fa-magic"></i>
                        <span style="padding-left: 35px;">服务器永不宕机</span>
                    </a>
                </div>
            </div>

            <!-- Main Footer -->
          <jsp:include page="copy.jsp" />
